<template>
<div class="movie-container">
<!--  this.$route 是路由的参数对象-->
<!--  this.$router是路由的导航对象-->
  <h3>Movie组件---{{ this.$route.params.id}}--{{ id }}</h3>
  <button @click="showThis">打印this</button>
</div>
</template>

<script>
export default {
  name: "myMovie.vue",
  //接收props 数据
  props:['id'],
  methods:{
    showThis(){
      console.log(this)
    }
  }
}
</script>

<style lang="less" scoped>
.movie-container {
  min-height: 200px;
  background-color: lightsalmon;
  padding: 15px;
}
</style>
